//
//  TextColorCell.m
//  GIFShow
//
//  Created by lanou11air029 on 15/4/24.
//  Copyright (c) 2015年 CK. All rights reserved.
//

#import "TextColorCell.h"

@interface TextColorCell ()
@end
@implementation TextColorCell

- (void)awakeFromNib {
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self setupSubViews];
    }
    return self;
}

-(void)setupSubViews{
    
    CGRect screenBounds = [UIScreen mainScreen].bounds;
    CGFloat orignY = screenBounds.size.height * 0.09;
//    CGFloat btnWidth = screenBounds.size.width * 0.25;
//    CGFloat btnHeight = screenBounds.size.height * 0.25;
    
    self.textTitleLabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, 100, screenBounds.size.height * 0.085)];
    self.textTitleLabel.text = @"文字颜色";
    self.textTitleLabel.font = [UIFont systemFontOfSize:18];
    [self.contentView addSubview:self.textTitleLabel];
    self.colorView = [[UIView alloc]initWithFrame:CGRectMake(screenBounds.size.width - orignY-15, orignY * 0.1, orignY, orignY*0.7)];
    self.colorView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.colorView];
    self.colorView.layer.cornerRadius = 4;
    self.colorView.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.colorView.layer.borderWidth = 0.6;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    if(selected){
            self.contentView.backgroundColor = [UIColor colorWithRed:0.95 green:1 blue:0.95 alpha:0.8];
    }else{
            self.contentView.backgroundColor = [UIColor colorWithWhite:0.9 alpha:0.8];
    }
    // Configure the view for the selected state
}

@end
